<template>
  <div class="social-media-bar">
    <div class="social-icons">
      <a v-for="item in socialItems" :key="item.id" :href="item.url" :title="item.name" target="_blank" rel="noopener noreferrer" class="social-link">
        <span class="social-icon">{{ item.icon }}</span>
      </a>
    </div>
  </div>
</template>

<script setup lang="ts">
interface SocialItem {
  id: number
  name: string
  url: string
  icon: string
}

const socialItems: SocialItem[] = [
  { id: 1, name: '微信', url: '#', icon: '💬' },
  { id: 2, name: '微博', url: '#', icon: '📱' },
  { id: 3, name: '抖音', url: '#', icon: '🎵' },
  { id: 4, name: '小红书', url: '#', icon: '📕' },
  { id: 5, name: 'B站', url: '#', icon: '📺' }
]
</script>

<style scoped>
.social-media-bar {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
}

.social-icons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(35, 43, 57, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: 15px 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(229, 135, 7, 0.2);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(27, 33, 45, 0.6);
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  border: 2px solid rgba(229, 135, 7, 0.3);
}

.social-link:hover {
  background: var(--primary-color);
  color: var(--background-color);
  transform: translateX(5px);
  box-shadow: 0 6px 20px rgba(229, 135, 7, 0.5);
  border-color: var(--primary-color);
}

.social-icon {
  font-size: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .social-media-bar {
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    top: auto;
  }
  
  .social-icons {
    flex-direction: row;
    padding: 10px 15px;
    border-radius: 30px;
    gap: 10px;
  }
  
  .social-link {
    width: 42px;
    height: 42px;
  }
  
  .social-link:hover {
    transform: translateY(-3px);
  }
}
</style>